1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a computer program, and more particularly, to an image processing apparatus and an image processing method, which are suitable for use in dividing a photographed image on photographing distance basis to process the photographed image.
2. Description of the Related Art
Along with the development in technique of a digital still camera, there is hitherto developed a technique of enhancing representational power of a photographed image by performing image processing on the photographed image. In Japanese Patent Application Laid-Open No. 2009-110137, there is disclosed a technique involving performing a shading process based on a photographing distance to a photographing target that is calculated for each partial area within an image pickup area. Specifically, in Japanese Patent Application Laid-Open No. 2009-110137, a plurality of distance measurement frames of a well-known contrast AF system are arranged on a picture image, among small areas divided in accordance with a color of an image or the like, small areas that have photographing distances close to each other, which distances are obtained as a result of distance measurement, are combined to extract an object, and a shading process is performed for each object. Japanese Patent Application Laid-Open No. 2009-110137 is described as being able to generate an image with more effective blurring expression like that made in a single lens reflex camera even in the photographing with a compact digital camera having a large depth of field by obtaining a result of area division according to the distance from the photographing target to an image pickup position as described above.
However, with the technique disclosed in Japanese Patent Application Laid-Open No. 2009-110137, other photographing targets having similar colors are undesirably treated as a single photographing target, and hence the same blurring amount is undesirably set for other photographing targets positioning at different distances. Accordingly, the result of the shading process contradicts the photographing distances in some cases up to now.
In addition, with the technique disclosed in Japanese Patent Application Laid-Open No. 2009-110137, when the photographing distance is determined for each of the small areas divided in accordance with the color of the image or the like, the photographing distance of a distance measurement frame in which the distance is erroneously measured is undesirably specified in some cases up to now. Accordingly, an appropriate area in which the small areas having substantially the same photographing distance are combined cannot be generated in some cases up to now.